package string;

import java.util.Scanner;

public class Demo03 {
    public static void main(String[] args) {
        /*
        * www.tedu.com
        * 通过indexof，lastindexof和substring方法截取tude
        * */
        String str = "www.myworld.com.cn";
        int index = str.indexOf(".");
        int indexs = str.indexOf(".",4);
        String sub = str.substring(index+1,indexs);
        System.out.println(sub);

        Scanner scan = new Scanner(System.in);
        String str1;
        char ch;
        int i;
        str1 = scan.nextLine();
        for (i = 0;i<=str1.length();i++){
            ch = str1.charAt(i);
            if(ch>= 'A' && ch<= 'Z')
                ch = (char) (ch+32);
            else if(ch>= 'a' && ch <= 'z')
                ch = (char) (ch - 32);
            System.out.print(ch);

        }



    }
}
